<?php
/**
 * User: 五哥派
 * Date: 2024/6/29
 * Tel(同WX): 17335592719
 */
namespace app\admin\model\store;

use app\admin\model\Base;

class Goods extends Base{

    protected $name = 'store_goods';
    //protected $order = ["sort" => "desc", 'id' => 'desc'];

    public function category(){
        return $this->belongsTo('category','cate_id');
    }

    public function getList($where=array()){
        return self::with(['category'])->where($where)->order($this->order)->paginate($this->limit, false);
    }

}